<template>
  <div class="nav-header">
    <div class="menu-icon" @click="handleClickExpand">
      <el-icon size="28px">
        <component :is="isFold? 'Expand':'Fold'"></component>
      </el-icon>
    </div>
    <div class="content">
      <header-crumb />
      <header-info />
    </div>
  </div>
</template>
<script setup lang="ts"  name="nav-header">
import HeaderInfo from './c-cpns/header-info.vue'
const emit = defineEmits(['foldChange'])
let isFold = ref(false)
function handleClickExpand() {
  isFold.value = !isFold.value;
  emit('foldChange', isFold.value)
}
</script>
<style scoped lang="less">
.nav-header {
  display: flex;
  align-items: center;
  flex: 1;
  height: 100%;

  .menu-icon {
    display: flex;
    align-items: center;
    cursor: pointer;
  }

  .content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    padding: 0 18px;
  }
}
</style>
